<ul class="list-unstyled list-image list-bord list-bord-font list-bord-border">

    <% categories.each do |c| %>
        <% if session[:selected_categories].include?(c.id) %>
            <li class="category selected link-hover link-hover-effect" data-id="<%= c.id %>">
              <%= c.name %>
              <span class="deselect-category">x</span>
            </li>
        <% else %>
            <li class="category link-hover link-hover-effect" data-id="<%= c.id %>">
              <%= c.name %>
              <span class="deselect-category" style="display: none;">x</span>
            </li>
        <% end %>
    <% end %>

</ul>